#coding=utf-8

from PyQt4.QtGui import *
from PyQt4.QtCore import *

def infoDialog(title,text,logoFile):
    '''把QMessage簡單包裝起來'''
    msgBox = QMessageBox(
            title,
            text,
            QMessageBox.Question,
            QMessageBox.Ok ,QMessageBox.NoButton ,QMessageBox.NoButton
            )
    msgBox.setIconPixmap(QPixmap(logoFile))
    msgBox.exec()

def questionDialog(title,text,logoFile):
    '''把QMessage簡單包裝起來'''
    msgBox = QMessageBox(
            title,
            text,
            QMessageBox.Information,
            QMessageBox.Yes ,QMessageBox.No ,QMessageBox.NoButton)
    msgBox.setIconPixmap(QPixmap(logoFile))
    #msgBox.setTextFormat(Qt.RichText)
    if msgBox.exec() == QMessageBox.Yes:
        return True
    else:
        return False

